import type { LoginParams, Profile, TokenInfo } from '@/types/user.d.ts'
import { http } from '@/utils/reuqest'

/**
 * 登录
 */
export const userLoginApi = (data: LoginParams) => {
  return http.post<TokenInfo>('/park/login', data)
}
/**
 * 查询登录人用户、角色和权限信息
 */
export const userGetUserRolePermApi = () => {
  return http.get<Profile>('park/user/profile')
}
/**
 * 修改密码
 */
export const passwordUpdateApi = (data: any) =>
  http.put<null>('park/profile/updatePwd', data)
